﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="ListLayout.aspx.cs" Inherits="Admin_ListLayout" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="postedit" class="clearfix">
        <h2 class="ico_mug">
            List Layout Code</h2>
        <asp:GridView ID="grdListlayout" CssClass="yui" Width="90%" runat="server" AutoGenerateColumns="False"
            OnRowDataBound="grdListlayout_RowDataBound" AllowPaging="True" 
            onpageindexchanging="grdListlayout_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="IDLayout" HeaderText="ID">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Image">
                    <ItemTemplate>
                        <asp:Image ID="imgLayout" Style="width: 50px" runat="server" ImageUrl='<%# "~/Admin/img/Layout/" + Eval("ImageURL") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFields="IDLayout" DataTextField="LayoutName" 
                    HeaderText="Layout Name" 
                    DataNavigateUrlFormatString="~Admin/GetLayoutCode.aspx?idLayout={0}" />
                <asp:BoundField DataField="ViewCount" HeaderText="View">
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="Display">
                    <ItemTemplate>
                        <asp:Image ID="imgDisplay" runat="server" ImageUrl="~/Admin/img/Display_t.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Display">
                    <ItemTemplate>
                        <asp:ImageButton ID="btnUpdate" runat="server" ToolTip="Edit Layout" CommandName="Confirm"
                            OnClick="btnUpdate_Click" CommandArgument='<%# Eval("IDLayout") %>' ImageUrl="~/Admin/img/config.png" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:ImageButton ID="btnConfirm" runat="server" ToolTip="Delete Layout" CommandName="Delete"
                            OnClick="btnConfirm_Click" CommandArgument='<%# Eval("IDLayout") %>' ImageUrl="~/Admin/img/Del.png" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="clsGrdHeader" />
            <RowStyle CssClass="clsGrdRow" />
            <AlternatingRowStyle CssClass="clsGrdAlternateRow" />
            <PagerStyle CssClass="clsPage" />
        </asp:GridView>
    </div>
</asp:Content>
